package com.asia5b.a5mall.order.widget

import android.content.Context
import androidx.databinding.DataBindingUtil
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.asia5b.a5mall.middleware.model.bean.OrderPlaceMenuBean
import com.asia5b.a5mall.order.R
import com.asia5b.a5mall.order.databinding.ItemOrderplaceMenuBinding

class OrderPlaceMenuView @JvmOverloads constructor(
        context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : LinearLayout(context, attrs, defStyleAttr) {
    var selectModel: Any? = null
    val orderplaceMenuBinding: ItemOrderplaceMenuBinding

    init {
        orderplaceMenuBinding = DataBindingUtil.inflate<ItemOrderplaceMenuBinding>(LayoutInflater.from(context), R.layout.item_orderplace_menu, this, true)
    }

    fun setMenuBean(menuBean: OrderPlaceMenuBean) {
        orderplaceMenuBinding.model = menuBean
    }
}